package com.hnkywl.sts.entity.cwgl.kmys;

import com.hnkywl.sts.entity.BaseEntity;
import com.hnkywl.sts.entity.base.Sjzdz;
import com.hnkywl.sts.entity.organ.Nbgs;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: ccr
 * Date: 13-5-16
 * Time: 下午9:25
 * To change this template use File | Settings | File Templates.
 */
@Entity
@Table(name = "T_SYS_TYFZHSMC")
@Where(clause = "deleted!='1'")
public class Tyfzhsmc extends BaseEntity{
    @Id
    @SequenceGenerator(name = "seqTyfzhsmc", allocationSize = 1, sequenceName = "SEQ_SYS_TYFZHSMC")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqTyfzhsmc")
    private Long id;

    //名称
    private String mc;

    //值
    private String code;

    //大类
    private String dl;

    @OneToMany(mappedBy = "tyfzhsmc", cascade = CascadeType.ALL, fetch = FetchType.LAZY, targetEntity = Tyfzhsys.class)
    @Where(clause = "deleted!='1'")
    private List<Tyfzhsys> tyfzhsysList;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getMc() {
        return mc;
    }

    public void setMc(String mc) {
        this.mc = mc;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public List<Tyfzhsys> getTyfzhsysList() {
        return tyfzhsysList;
    }

    public void setTyfzhsysList(List<Tyfzhsys> tyfzhsysList) {
        this.tyfzhsysList = tyfzhsysList;
    }

    public String getDl() {
        return dl;
    }

    public void setDl(String dl) {
        this.dl = dl;
    }
}
